1. Technical Field
The present invention relates generally to an improved data processing system and in particular to a method and apparatus for displaying pixels in a data processing system. Still more particularly, the present invention provides a method and apparatus for updating a window identification buffer used to display pixels in a data processing system.
2. Description of Related Art
Computer graphics concerns the synthesis or display of real or imaginary objects from computer-based models. In computer graphics systems, images are displayed on a display device to a user in two dimensional and three dimensional forms. These images are displayed using pixels. A pixel is short for a picture element. One spot in a rectilinear grid of thousands of such spots that are individually xe2x80x9cpaintedxe2x80x9d to form an image produced on the screen by a computer or on paper by a printer. A pixel is the smallest element that display or print hardware and software can manipulate in creating letters, numbers, or graphics. These pixels and information relating to these pixels are stored in a buffer. The information describing a pixel is identified using a window ID (WID). A WID is used as an index into a window attribute table (WAT). The WAT contains information describing how a pixel will be displayed on the screen. For example, a WAT identifies depth, color map, buffer, and gamma for a pixel.
Typically, the WID is drawn into a separate buffer, which is used to describe how the pixels in the frame buffer or buffers will be rastered. Some graphic systems, such as, for example, UNIX servers, use overlays to enhance the performance of three dimensional applications, which need to be overlaid on top of a three dimensional application. An example of such is a menu. These type of servers typically require a separate WID buffer for the color planes and overlays to allow for the WIDs to be saved and restored. In FIG. 1, an example of data in a portion of a WID color buffer is illustrated. FIG. 2 is an example of data in a portion of a WID overlay buffer. In these two examples, each of the numbers illustrates a WID, which is used as an index into a WAT to identify information used to display a pixel associated with the WID. In FIG. 2, a zero is used to indicate that the overlay is disabled.
Typically, an eight bit split WID may be identified in hardware in which three bits are used to identify the WID for the overlay buffer and in which five bits are used to identify the WID for the color buffer. For example, the first three bits are used as an index into an overlay WAT while the lower five bits are used as an index into a color WAT. With three bits, eight WID entries may be identified or assigned to a pixel using the WID overlay buffer. Thirty-two different WID entries may be assigned to pixels using the WID color buffer. In this manner, a WID for a color buffer may be painted to the frame buffer without overwriting the WID in the overlay buffer. FIG. 3 illustrates resulting WIDs that would be used to display the pixels on a screen.
In manufacturing graphics chips, it is cheaper to fabricate a graphics chip without split WIDs. In such a case, only one WID buffer and two frame buffers are required. The problem with this structure is that rendering color buffer WIDs may result in overwriting of opaque overlay WIDs because only one WID buffer is provided, rather than two.
Therefore, it would be advantageous to have an improved method and apparatus for rendering pixels using a single WID buffer.
The present invention provides a method and apparatus in a data processing system for updating a buffer used to display pixels from a first layer and a second layer in the data processing system, wherein identification display information for pixels from the first layer and the second layer are stored in the buffer. Pixels are identified for the second layer having opaque pixel types to form a selected set of pixels. Overwriting of display information is prevented for the selected set of pixels in the buffer when updating the buffer.